using System;
using System.Collections.Generic;
using System.Text;

namespace Winsmarts.PI.Common
{
    public static class Trace
    {
        public static void Write(string message)
        {
            Console.Write(message);
        }

        public static void WriteLine(string message)
        {
            Write(message);
            Write("\n");
        }

        public static void WriteLine(string message, bool isError)
        {
            if (isError) Write("** ERR:");
            WriteLine(message);
        }

        public static void PrintHelp()
        {
            // -mapping mapfile.xml -inputs inputsfile.xml -url http://moss2007
            Trace.WriteLine(
                @"
=================================================
Profile Import Utility
=================================================

Usage: PI -mapping <mapfile.xml> -inputs <inputfile.xml> -url <MOSS_Web_URL>

*********** Required Parameters are: ***********
-mappingfile: 
            This Parameter points to an XML file that specifies mapping between your XML elements and MOSS properties.
            For instance, PostalCode in your SAP system may mean ZipCode in your MOSS system, the mapping would thus look like this - 
            <Mapping InputField='PostalCode' MOSSField='ZipCode'/> 

-inputs The file taht contains your data

-url URL of the MOSS 2007 web.

*********** XML File structures are: ***********

Mapping File: 
<Mappings>
 <Mapping InputField=.. MOSSField=../>
  ...
</Mappings>

Inputs File: 
<Inputs>
  <Input>
    <AccountName>MOSS2007\administrator</AccountName>
    <Title>Some JobTitle</Title>
    ... other properties ...
  </Input>
  ... other inputs ...
</Inputs>

The inputs file can have properties identified by elements that mean something to your MOSS web.
Both inputs are validated via Embedded Schemas (the schemas are available in the source code).

*********** Sample usage: ***********
PI -mapping mapfile.xml -inputs inputsfile.xml -url http://moss2007
                "
                );
        }
    }
}
